<?php
	error_reporting(E_ERROR | E_WARNING | E_PARSE);
	$id = $_POST['id'];
	$p = array();
	$p = $_POST;
	$time = time();
	$conn = mysql_connect("127.0.0.1","root","");
	if (!$conn) {
		echo "链接错误";
		exit();
	}
	if (!mysql_query("use messageboard",$conn)) {
		echo "数据库链接失败";
		exit();
	}
	mysql_query("set names utf8",$conn);
	mysql_query("update data set '{name=$p[1]}', '{write=$p[2]}', time = $time where id=$id",$conn);
	header("Location:index.php");
	
?>